﻿using CallCenter.Data.Base;
using CallCenter.Data.Models;
using CallCenter.Data.Utility;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Hosting;

namespace CallCenter.Data.BizUtilities
{
   public class FeatureUtility:BaseUtility
    {
        public FeatureUtility(DataManager manager)
            :base(manager) { }
        public List<FeaturesVM> GetFeatures()
        {
            using (var cmd = this.Factory.GetCommand("usp_FeatureCrud", true, false)
                .AddParameter("@pMode", 1))
            {
                var param = this.Factory.AddParameter(cmd, "@pResult", System.Data.SqlDbType.NVarChar, 500, null);
                param.Direction = System.Data.ParameterDirection.Output;

                return this.Factory.ExecuteObjects<FeaturesVM>(cmd);
            }
        }
    }
}
